package org.jeecg.modules.rental.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.rental.entity.RentalPackageConfig;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @Description: 租赁配置
 * @Author: sean
 * @Date:   2024-08-02
 * @Version: V1.0
 */
public interface IRentalPackageConfigService extends IService<RentalPackageConfig> {

    IPage<RentalPackageConfig> selectJoinPage(Page page, Wrapper wrapper);

    List<RentalPackageConfig> rentalConfigNews(Long carTypeId);

    List<RentalPackageConfig> renewConfigNews(Long carTypeId);

    /**
     * 计算结束时间
     * @param packageConfId
     * @param startTime
     * @return
     */
    LocalDateTime calcPkgEndTime(Long packageConfId, LocalDateTime startTime);
}
